package sim.service.impl;

import java.util.List;

import javax.annotation.Resource;

import sim.dao.MgrDAO;
import sim.domain.Manager;
import sim.service.MgrService;

public class MgrServiceImpl implements MgrService {
	@Resource private MgrDAO mgrDAO; 
	public void addManager(Manager mgr) {
		mgrDAO.addManager(mgr);

	}
	public List getAll() {
		return mgrDAO.getAll();
	}
	public Manager getManagerByName(String name) {
		Manager mgr = mgrDAO.getManagerByName(name);
		return mgr;
	}
	public void updateManager(Manager mgr) {
		mgrDAO.modifyManager(mgr);
		
	}
	public void delManager(Manager mgr) {
		mgrDAO.deleteManager(mgr);
		
	}
	
}
